package com.dynamixsoftware.printershare.smb.dcerpc;

import com.dynamixsoftware.printershare.smb.WinError;
import com.dynamixsoftware.printershare.smb.util.Dumper;
import java.io.IOException;

class DcerpcException
  extends IOException
  implements WinError, DcerpcError
{
  private int error;
  
  DcerpcException(int paramInt)
  {
    super(getMessageByDcerpcError(paramInt));
    this.error = paramInt;
  }
  
  DcerpcException(String paramString)
  {
    super(paramString);
  }
  
  private static String getMessageByDcerpcError(int paramInt)
  {
    int i = 0;
    int j = DCERPC_FAULT_CODES.length;
    while (j >= i)
    {
      int k = (i + j) / 2;
      if (paramInt > DCERPC_FAULT_CODES[k]) {
        i = k + 1;
      } else if (paramInt < DCERPC_FAULT_CODES[k]) {
        j = k - 1;
      } else {
        return DCERPC_FAULT_MESSAGES[k];
      }
    }
    return "0x" + Dumper.toHexString(paramInt, 8);
  }
  
  public int getErrorCode()
  {
    return this.error;
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.smb.dcerpc.DcerpcException
 * JD-Core Version:    0.7.0.1
 */